package com.msb.exception.visualvm;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class HeapController {

    @GetMapping("/heap")
    public void heap(){
        List<String> list = new ArrayList<>();
        int i = 0;
        while (true){
            System.out.println(i++);
            list.add(new String("hello world"));
        }
    }
}
